SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vwbAlumnosPilquenDivisiones
AS
SELECT     SageNacional.dbo.Alumnos_Pilquen.[ Apellido ] AS ApellidoPilquen, SageNacional.dbo.Alumnos_Pilquen.[ Nombre ] AS NombrePilquen, 
                      dbo.tb_Alumnos.Documento, dbo.tb_AlumnoDivision.AnioLectivo
FROM         SageNacional.dbo.Alumnos_Pilquen INNER JOIN
                      dbo.tb_Alumnos ON SageNacional.dbo.Alumnos_Pilquen.NroDoc = dbo.tb_Alumnos.Documento INNER JOIN
                      dbo.tb_AlumnoDivision ON dbo.tb_Alumnos.idAlumno = dbo.tb_AlumnoDivision.Alumno
GO
GRANT SELECT ON  [dbo].[vwbAlumnosPilquenDivisiones] TO [Alumnos]
GO
